/*
 * @Author: jiu yin
 * @Date: 2023-02-17 15:57:59
 * @LastEditTime: 2024-06-28 17:56:54
 * @LastEditors: jiu yin zhen jing
 * @FilePath: \studio-web-admin\src\api\home.js
 * jiu
 */
import request from "@/utils/request"










//编辑账号
export const edit_account_info = (data) => {
    return request({
        url: "/api/v1/user/edit_account_info",
        method: "POST",
        data
    })
}

//重置密码
export const reset_password = (data) => {
    return request({
        url: "/api/v1/srv/user/reset_password",
        method: "POST",
        data
    })
}




//------------角色管理

//角色列表
export const list_role = (data) => {
    return request({
        url: "/api/v1/role/list_role",
        method: "POST",
        data
    })
}
//创建角色
export const create_role = (data) => {
    return request({
        url: "/api/v1/role/create_role",
        method: "POST",
        data
    })
}


// //标签启停
// export const edit_label_status = (data) => {
//     return request({
//         url: "/api/v1/label/edit_label_status",
//         method: "POST",
//         data
//     })
// }


//删除角色
export const del_role = (data) => {
    return request({
        url: "/api/v1/role/del_role",
        method: "POST",
        data
    })
}

// //标签详情
// export const details_label = (data) => {
//     return request({
//         url: "/api/v1/label/details_label",
//         method: "POST",
//         data
//     })
// }

//编辑标签
export const edit_role = (data) => {
    return request({
        url: "/api/v1/role/edit_role",
        method: "POST",
        data
    })
}



//------------账号管理

//账号列表
export const list_account = (data) => {
    return request({
        url: "/api/v1/user/list_account",
        method: "POST",
        data
    })
}
//创建账号
export const create_account = (data) => {
    return request({
        url: "/api/v1/user/create_account",
        method: "POST",
        data
    })
}

//编辑账号
export const edit_account = (data) => {
    return request({
        url: "/api/v1/user/edit_account",
        method: "POST",
        data
    })
}




//账号启停
export const edit_account_status = (data) => {
    return request({
        url: "/api/v1/user/edit_account_status",
        method: "POST",
        data
    })
}

//日志管理
export const log_list = (data) => {
    return request({
        url: "/api/v1/log/log_list",
        method: "POST",
        data
    })
}

//登出服务平台账号
export const logout = (data) => {
    return request({
        url: "/api/v1/srv/user/logout",
        method: "POST",
        data
    })
}


// 会员列表
export const member_list = (data) => {
    return request({
        url: "/api/v1/srv/member/list",
        method: "POST",
        data
    })
}

//-----------------------首页--------------

// 基础信息(包含公会信息和经营信息)
export const basic_information = (data) => {
    return request({
        url: "/api/v1/home/basic_information",
        method: "POST",
        data
    })
}

// 播控任务数据概览
export const program_data_overview = (data) => {
    return request({
        url: "/api/v1/home/program_data_overview",
        method: "POST",
        data
    })
}

// 订单/票数据概览
export const ticket_order_data_overview = (data) => {
    return request({
        url: "/api/v1/home/ticket_order_data_overview",
        method: "POST",
        data
    })
}

// 营收信息概览
export const income_data_overview = (data) => {
    return request({
        url: "/api/v1/home/income_data_overview",
        method: "POST",
        data
    })
}




//-----------------------播控--------------

// 登录
export const login = (data) => {
    return request({
        url: "/api/v1/auth/login",
        method: "POST",
        data
    })
}
//用户信息
export const get_user_info = (data) => {
    return request({
        url: "/api/v1/user/get_user_info",
        method: "POST",
        data
    })
}


//--------播控场景

// 任务可选场景列表
export const studio_scene_list = (data) => {
    return request({
        url: "/api/v1/studio/studio_scene_list",
        method: "POST",
        data
    })
}
// 创建播控任务
export const create_studio_program = (data) => {
    return request({
        url: "/api/v1/studio/create_studio_program",
        method: "POST",
        data
    })
}
// 删除播控任务
export const del_studio_program = (data) => {
    return request({
        url: "/api/v1/studio/del_studio_program",
        method: "POST",
        data
    })
}
// 编辑播控任务
export const edit_studio_program = (data) => {
    return request({
        url: "/api/v1/studio/edit_studio_program",
        method: "POST",
        data
    })
}
// 播放任务开关
export const play_program_switch = (data) => {
    return request({
        url: "/api/v1/studio/play_program_switch",
        method: "POST",
        data
    })
}
// 播控任务列表

export const list_studio_program = (data) => {
    return request({
        url: "/api/v1/studio/list_studio_program",
        method: "POST",
        data
    })
}
// 上方设备信息框
export const top_infobox = (data) => {
    return request({
        url: "/api/v1/studio/top_infobox",
        method: "POST",
        data
    })
}
// 设备列表
export const devices_list = (data) => {
    return request({
        url: "/api/v1/studio/devices_list",
        method: "POST",
        data
    })
}
// 设备列表2
export const list_device = (data) => {
    return request({
        url: "/api/v1/studio/list_device",
        method: "POST",
        data
    })
}
// 添加入场票
export const add_ticket_in = (data) => {
    return request({
        url: "/api/v1/studio/add_ticket_in",
        method: "POST",
        data
    })
}
// 添加设备
export const add_device_in = (data) => {
    return request({
        url: "/api/v1/studio/add_device_in",
        method: "POST",
        data
    })
}
// 扫码关联设备/关联入场票
export const link_device_or_ticket = (data) => {
    return request({
        url: "/api/v1/studio/link_device_or_ticket",
        method: "POST",
        data
    })
}
// 添加成员
export const add_member_in = (data) => {
    return request({
        url: "/api/v1/studio/add_member_in",
        method: "POST",
        data
    })
}
// 移除成员
export const remove_member_out = (data) => {
    return request({
        url: "/api/v1/studio/remove_member_out",
        method: "POST",
        data
    })
}
// 任务详情
export const program_detail = (data) => {
    return request({
        url: "/api/v1/studio/program_detail",
        method: "POST",
        data
    })
}
// 任务成员List
export const program_member_list = (data) => {
    return request({
        url: "/api/v1/studio/program_member_list",
        method: "POST",
        data
    })
}

//--------入场票
// 入场票列表
export const list_ticket = (data) => {
    return request({
        url: "/api/v1/ticket/list_ticket",
        method: "POST",
        data
    })
}

//--------订单/出票接口



// 订单列表
export const list_ticket_order = (data) => {
    return request({
        url: "/api/v1/ticket/list_ticket_order",
        method: "POST",
        data
    })
}
// 订单出票列表
export const get_order_ticket_list = (data) => {
    return request({
        url: "/api/v1/ticket/get_order_ticket_list",
        method: "POST",
        data
    })
}

// 订单出票成功回调
export const print_ticket_notify = (data) => {
    return request({
        url: "/api/v1/ticket/print_ticket_notify",
        method: "POST",
        data
    })
}
// 未出票订单数量
export const order_num = (data) => {
    return request({
        url: "/api/v1/ticket/order_num",
        method: "POST",
        data
    })
}


//--------设备管理



// 添加设备
export const add_devices = (data) => {
    return request({
        url: "/api/v1/device/add_devices",
        method: "POST",
        data
    })
}

// 更新设备信息
export const update_devices_info = (data) => {
    return request({
        url: "/api/v1/device/update_devices_info",
        method: "POST",
        data
    })
}
// 查询设备信息
export const check_devices_info = (data) => {
    return request({
        url: "/api/v1/device/check_devices_info",
        method: "POST",
        data
    })
}
// 设备详情
export const device_detail = (data) => {
    return request({
        url: "/api/v1/device/device_detail",
        method: "POST",
        data
    })
}
// 修改设备状态
export const edit_device_status = (data) => {
    return request({
        url: "/api/v1/device/edit_device_status",
        method: "POST",
        data
    })
}
// 编辑设备信息
export const edit_device_info = (data) => {
    return request({
        url: "/api/v1/device/edit_device_info",
        method: "POST",
        data
    })
}
// 剩余席位
export const seat_balance = (data) => {
    return request({
        url: "/api/v1/device/seat_balance",
        method: "POST",
        data
    })
}
// 设备离线
export const offline_device = (data) => {
    return request({
        url: "/api/v1/device/offline_device",
        method: "POST",
        data
    })
}
// 设备里场景列表
export const application_list_device = (data) => {
    return request({
        url: "/api/v1/device/application_list_device",
        method: "POST",
        data
    })
}
// 设备里地图列表
export const map_list_device = (data) => {
    return request({
        url: "/api/v1/device/map_list_device",
        method: "POST",
        data
    })
}


//  -------------------消息

// 未读消息数量
export const unread_message = (data) => {
    return request({
        url: "/api/v1/message/unread_message",
        method: "POST",
        data
    })
}
// 消息列表
export const list_message = (data) => {
    return request({
        url: "/api/v1/message/list_message",
        method: "POST",
        data
    })
}
// 标记消息已读
export const read_message = (data) => {
    return request({
        url: "/api/v1/message/read_message",
        method: "POST",
        data
    })
}
// 删除消息
export const del_message = (data) => {
    return request({
        url: "/api/v1/message/del_message",
        method: "POST",
        data
    })
}
// 消息详情
export const detail_message = (data) => {
    return request({
        url: "/api/v1/message/detail_message",
        method: "POST",
        data
    })
}

//  -------------------常见问题


// 帮助列表

export const faq_list = (data) => {
    return request({
        url: "/api/v1/help/faq_list",
        method: "POST",
        data
    })
}
// 帮助详情
export const faq_detail = (data) => {
    return request({
        url: "/api/v1/help/faq_detail",
        method: "POST",
        data
    })
}



//  -------------------场景应用管理

// 自己场景应用列表
export const list_application = (data) => {
    return request({
        url: "/api/v1/application/list_application",
        method: "POST",
        data
    })
}
// 场景应用添加
export const add_application = (data) => {
    return request({
        url: "/api/v1/application/add_application",
        method: "POST",
        data
    })
}
// 场景应用详情
export const detail_application = (data) => {
    return request({
        url: "/api/v1/application/detail_application",
        method: "POST",
        data
    })
}
// 在线设备列表
export const list_online_device = (data) => {
    return request({
        url: "/api/v1/application/list_online_device",
        method: "POST",
        data
    })
}
// 在线设备状态更改
export const deploy_application_result = (data) => {
    return request({
        url: "/api/v1/application/deploy_application_result",
        method: "POST",
        data
    })
}
// 场景应用商店列表
export const shop_application = (data) => {
    return request({
        url: "/api/v1/application/shop_application",
        method: "POST",
        data
    })
}
// 场景应用版本列表
export const version_application_list = (data) => {
    return request({
        url: "/api/v1/application/version_application_list",
        method: "POST",
        data
    })
}



//  -------------------地图应用管理

// 地图列表
export const list_atlas = (data) => {
    return request({
        url: "/api/v1/map/list_atlas",
        method: "POST",
        data
    })
}
// 地图创建
export const create_atlas = (data) => {
    return request({
        url: "/api/v1/map/create_atlas",
        method: "POST",
        data
    })
}
// 地图移除
export const del_atlas = (data) => {
    return request({
        url: "/api/v1/map/del_atlas",
        method: "POST",
        data
    })
}
// 地图详情
export const detail_atlas = (data) => {
    return request({
        url: "/api/v1/map/detail_atlas",
        method: "POST",
        data
    })
}
// 地图编辑
export const edit_atlas = (data) => {
    return request({
        url: "/api/v1/map/edit_atlas",
        method: "POST",
        data
    })
}
// 地图设备部署情况
export const list_online_device_map = (data) => {
    return request({
        url: "/api/v1/map/list_online_device",
        method: "POST",
        data
    })
}
// 设备里地图状态
export const deploy_map_result = (data) => {
    return request({
        url: "/api/v1/map/deploy_map_result",
        method: "POST",
        data
    })
}
